import request from '@/utils/request'


// 根据字典类型获取字典值
export function getDictList(type) {
  return request({
    url: '/system/acddShopType/' + type,
    method: 'GET'
  })
}


// 获取活动类型列表
export function getActiveTypeDict() {
  return request({
    url: '/system/acddActivityType/activityType',
    method: 'GET'
  })
}

// 获取服务类型列表
export function getServeTypeDict() {
  return request({
    url: '/system/acddServeType/serveTypeList',
    method: 'GET'
  })
}


// 获取商家列表
export function getShopListDict() {
  return request({
    url: '/system/acddFinance/shopList',
    method: 'GET'
  })
}


// ?ids=5,6
export function getShopListByIds(params) {
  return request({
    url: '/system/acddShop/acddShopIds',
    method: 'GET',
    params
  })
}

// 获取商家类型列表
export function getShopTypeDict() {
  return request({
    url: '/system/acddShopType/shopTypeList',
    method: 'GET'
  })
}


// 发短信
export function getCode(phone) {
  let data = {
    phone, 
    identification: process.env['VUE_APP_RULE']
  }
  return request({
    url: '/common/sendCode',
    method: 'post',
    data
  })
}

// 激活人员列表
export function getActivateUserList() {
  return request({
    url: '/system/acddOrder/activateUserList',
    method: 'get'
  })
}

// 核销用户列表
export function getVerificationUserList() {
  return request({
    url: '/system/acddOrder/verificationUserList',
    method: 'get'
  })
}

// 根据银行卡号查询银行信息
export function getBankNameByCode(bankCode) {
  return request({
    url: `/common/getBankName?bankCode=${bankCode}`,
    method: 'get'
  })
}

// 省份
export function getProvinceList() {
  return request({
    url: `/system/acddRegion/provinceList`,
    method: 'get'
  })
}

// 市
export function getCityListById(id) {
  return request({
    url: `/system/acddRegion/cityList/${id}`,
    method: 'get'
  })
}




// ORC身份证信息提取
export function getOrc(params) {
  return request({
    url: '/system/acddShopMessage/recognitionID',
    method: 'get',
    params
  })
}


// 
export function buildOneselfServeList(params) {
  return request({
    url: '/system/acddServe/buildOneselfServeList',
    method: 'get',
    params
  })
}